package com.fwj.authorization.staff.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fwj.authorization.staff.entity.SysPermission;
import com.fwj.authorization.staff.entity.SysRole;

import java.util.List;

/**
 * 权限
 *
 * @author 樊温军
 * @date 2025/3/18 上午10:32
 */
public interface SysPermissionService extends IService<SysPermission> {

    /**
     * 权限码—分页
     *
     * @param page          分页
     * @param sysPermission 查询条件
     * @return IPage<SysPermission>
     */
    IPage<SysPermission> getPage(Page<SysPermission> page, SysPermission sysPermission);

    /**
     * 保存权限码
     *
     * @param sysPermissions 权限集合
     * @return Boolean
     */
    Boolean savePermission(List<SysPermission> sysPermissions);


    List<SysRole> getRoleListByPermissionUrl(String permissionUrl);

}
